home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / look4.arc / LOOK4.TXT < prev    next >
Text File  |  1985-12-01  |  22KB  |  483 lines

  1. ====================================================================== 
  2.                               Tony Lindsey  
  3.                            3752 Third Avenue  
  4.                         San Diego, CA 92103-4112  
  5.                  Voice communications ONLY: (619) 295-2922
  6. ====================================================================== 
  7.  
  8.                             INTRODUCTION
  9.  
  10.      This is a quick and VERY snappy way to search through and maintain
  11. the XFERLIST file that can be downloaded from Gene's bulletin board in
  12. Chicago, and we only need to use the Disk Operating System to do it!
  13.  
  14.      The XFERLIST file contains many lines of information, each describing
  15. a file that can be downloaded onto our computers. This listing can EASILY
  16. overwhelm us, because it contains so much information in so many lines.
  17. There were almost 2,000 files listed as of December 1985.
  18.  
  19.      Here are some examples:
  20.  
  21. DSM206.LBR   -11-09-85 LATEST DOS-O-MATIC VERSION 2.06      (ID1590)  92288
  22. BLAKBOOK.ARC -11-09-85 ADDRESS BOOK PGM IN TURBO, PRINTS    (ID1648)  80128
  23. HDPREP.ARC   -11-07-85 HARD DISK PREPARATION UTILITIES      (ID0178)  63104
  24. MPMPRN3.LBR  -11-07-85 IBM CHARACTER SET FOR EPSON PRINTERS (ID0178)  68864
  25. DISKDRIVE    -11-03-85 360K DISK DRIVE UPGRADE FOR AT & 286 (ID0270)   1325
  26. XFRDB2.ARC   -10-20-85 MAINTAIN GENE'S XFERLIST W/DBASEII   (ID1580)  14336
  27. CAROLS.EXE   -10-20-85 MENU SELECTION OF 24 CHRISTMAS SONGS (ID0547)  41216
  28. FIND-SAT.BAS -10-03-85 FIND SATELLITE COORDS FOR 17 CITIES  (ID0284)  18944
  29. DIRS.ARC     -09-30-85 TOTAL FILE SPACE USED IN SUBDIR      (ID0012)  17664
  30. ESIE.LBR     -09-29-85 AN EXPERT SYSTEM SHELL               (ID0090) 117888
  31.  
  32.      Every line must pack a lot of information:
  33.  
  34. CAROLS.EXE   -10-20-85 MENU SELECTION OF 24 CHRISTMAS SONGS (ID0547)  41216
  35.                                                                    
  36.     │            │     └──────┬───────────────────────────┘     │       │
  37.     │            │            │  Who sent the file to Gene ─────┘       │
  38.     │            │            │  The file's size ───────────────────────┘
  39.     │            │            └─ The file's 36-character description
  40.     │            └────────────── The date it was sent to the bulletin board
  41.     └─────────────────────────── The file name and extension
  42.  
  43.                 WHY THE LOOK4 PROCEDURE IS NECESSARY
  44.  
  45.      Looking for one or two files in the midst of all of this information 
  46. can be a drag. If you print out the WHOLE file, it can take a LOT of time, 
  47. trying to read it in any form can give you a headache, and you'll be lucky
  48. if you retain ANY of it!  Some people have set up database manager programs
  49. to search through and add to this list using dBASE II and III and other
  50. database managers. I personally find this to be slow. Instead, I use
  51. common DOS 3.10 commands (plus one minor freeware file and several text
  52. files) to search through and maintain the XFERLIST file.
  53.  
  54.                     WHAT RESULTS YOU CAN EXPECT
  55.  
  56.      Once everything is all set up, all you'll have to do is to start up
  57. your computer using a particular diskette, and then decide what you'd like
  58. to look for. For example, if you've just bought the program called
  59. "Managing Your Money", you might want to look for every occurrence of
  60. "MYM" within the XFERLIST file, so you can download anything that appeals
  61. to you. You could then issue the following command:
  62.  
  63. LOOK4 MYM
  64.  
  65.      Using a RAM-Disk, this has yielded me the following result on my screen 
  66. in slightly less than 9 seconds:
  67.  
  68. MYM_ALL.UNP  -09-19-85 UNPROTECT MYM - ALL REVS             (ID1516)5  3584
  69. MYMFIX.ARC   -08-25-85 UNPRO. MAN. YR. MONEY W/O PRG. MODS  (ID0094)5  1792
  70. MYM.HRD      -05-29-85 RUN MYM FROM A HARD DISK             (ID1659)5  2176
  71.  
  72.      You can see how "MYM" is contained within each line.
  73.  
  74.      Once again, this procedure located and displayed 3 lines within a file 
  75. containing 147,456 characters in 8.89 seconds!  I get the same result in 14.68 
  76. seconds using a 10 megabyte hard disk. I doubt that a database manager would 
  77. be so quick!
  78.  
  79.      If I desire the same result, only printed out on my printer, I can 
  80. use this variation:
  81.  
  82. LOOK4 MYM P
  83.  
  84.                            THE LESSONS:
  85.  
  86.      I will be explaining the quicker, RAM-Disk method of finding data
  87. first, then the plainer, slower hard-disk method, then I will explain how 
  88. to keep your XFERLIST data file current.
  89.  
  90. ========================================================================
  91.  
  92.        IF YOU WOULD LIKE TO USE THE LOOK4 PROCEDURE ON A RAM-DISK.
  93.  
  94. Here's what you'll need:
  95.  
  96. REQUIREMENTS:
  97. ==================
  98. - DOS 3.00 or 3.10
  99. - 512k or 640k of RAM 
  100. - A formatted, bootable floppy diskette created with the FORMAT A:/S command. 
  101.  
  102. We'll call this the LOOK4 diskette, and it should contain ALL of the
  103. following files:
  104.  
  105. Standard DOS files
  106. ==================
  107. VDISK.SYS      
  108. FIND.EXE
  109. MORE.COM
  110.  
  111. Plus the following files which SHOULD be included with this file:
  112. ==================
  113. FLIP.COM
  114. AUTOEXEC.BAT
  115. CONFIG.SYS
  116. LOOK4.BAT
  117.  
  118. And, finally, the main file with all of the data.
  119. ==================
  120. XFERLIST    
  121.  
  122. Once you have all of the files on the diskette, it SHOULD work right away 
  123. by re-starting your computer with that diskette. But, with life the way it
  124. is, maybe I should explain what everything does, so you can trouble-shoot.
  125.  
  126. VDISK.SYS      
  127.  
  128. The standard DOS-approved way of creating a RAM-disk using most of your
  129. computer's 512k or 640k of RAM. THIS WILL NOT BE A PROBLEM! You won't be
  130. using your computer for ANYTHING ELSE but SEARCHING FOR DATA whenever you
  131. use the LOOK4 diskette.
  132.  
  133. FIND.EXE       
  134.  
  135. A seldom-used DOS "filter" that searches through files for whatever string
  136. of characters you specify.
  137.  
  138. MORE.COM       
  139.  
  140. Another DOS filter, which provides a way of preventing lots of data from
  141. scrolling right off the screen before we get to see it.
  142.  
  143. FLIP.COM       
  144.  
  145. An old freeware utility that works well in a small amount of space. I use
  146. it with the LOOK4 routine to automatically "press" the CapsLock key for
  147. me. Here are all of the proper ways you can use it in a batch file:
  148.  
  149.                  FLIP CAPS ON 
  150.                  FLIP CAPS OFF 
  151.                  FLIP NUM ON 
  152.                  FLIP NUM OFF 
  153.                  FLIP MONO 
  154.                  FLIP COLOR 80 
  155.                  FLIP COLOR 40 
  156.  
  157.  
  158.                        THE CONFIG.SYS FILE.   
  159.  
  160.     This is a file we humans create, containing a collection of special
  161. commands.  These commands are NOT commands that you normally can type in
  162. at the DOS prompt.  The CONFIG.SYS file is an "obedience trainer" for your
  163. computer, and it's shocking how few people know the value of it.  The file
  164. called CONFIG.SYS is read by the computer just before AUTOEXEC.BAT, and
  165. has a different reason for existence.
  166.  
  167.      When you start up your computer, the Disk Operating System is
  168. loaded into memory.  It then looks for a file called CONFIG.SYS on the
  169. start-up disk.  If the file exists, then DOS performs the commands that
  170. we human beings have set up for it.  After that, the AUTOEXEC.BAT kicks
  171. in. 
  172.   
  173.     You can study the technical aspects of the CONFIG.SYS file in
  174. greater detail in your DOS manual's Configuration Commands section. 
  175.  
  176.     Here's what CONFIG.SYS on the LOOK4 diskette should look like: 
  177.  
  178. BREAK=ON
  179. BUFFERS=8
  180. files=28
  181. device=vdisk.sys 400
  182.  
  183.     Here are the explanations:
  184.  
  185. BREAK=ON             means that we want to reserve the right to panic
  186.                      and break out of problems we might be experiencing. 
  187. Normally, we can tell the computer to "WHOA" by holding down the CTRL
  188. KEY and briefly pressing the SCROLL LOCK or BREAK key on the upper right
  189. corner of the keyboard.  (See the word "Break" on the front of the key?)
  190. This procedure will still work, but now we've told the computer to pay
  191. EXTRA-attention to our desire to break out of what's going on.   
  192.  
  193. BUFFERS=8             is a great way to speed up your computer's disk
  194.                       accessing.  According to the great Peter Norton, 
  195. the best number of BUFFERS to assign depend on the type of disk drive
  196. you use the most.  If you only use floppy diskettes, you should set the
  197. number of BUFFERS to 8.  If you use an IBM PC XT with a 10-megabyte hard
  198. disk, set your BUFFERS to 16.  If you use an IBM AT or a Compaq Deskpro
  199. with a 20-megabyte hard disk, set your BUFFERS to 32.  I'm only
  200. guessing, but it seems like the progression is 16 BUFFERS to each 10
  201. megabytes.  Since we're using the LOOK4 diskette as an entity unto
  202. itself, let's leave this line alone.
  203.  
  204. FILES=28              means that we want to give DOS the ability to
  205.                       "juggle" up to 28 files in memory at once if 
  206. necessary.  This can include memory-resident utilities like Sidekick,
  207. Applications software like Symphony or Framework, Symphony's Tutorial
  208. Application, the Lotus Access Menu, and any other such goodies we might
  209. use during a typical day's work.  I've found that 28 is a good number,
  210. though there's no real upper limit to the number you can specify.  Each
  211. additional file you add takes up 39 more bytes of RAM memory.
  212.  
  213.     The FILES statement can be especially nice for all of the Symphony
  214. or Framework or dBASE III users who have discovered problems when
  215. combining their application software with various memory-resident
  216. programs like the Pop-Up series and SideKick.  You might have noticed
  217. that the computer would inexplicably lock up when you'd have many of
  218. these programs in memory.  Being logical and intelligent, you'd stop
  219. using these auxiliary programs.   
  220.  
  221.     A PROPERLY set-up FILES statement in the CONFIG.SYS file may clear
  222. up your woes!  This is advice that might just cause you to welcome
  223. Sidekick and all of the others back into daily use. 
  224.  
  225. DEVICE=VDISK.SYS 400  is THE most important line in the CONFIG.SYS file.
  226.                       It says that DOS should create a new device using
  227. the information stored in the file called VDISK.SYS. This information
  228. fools DOS into thinking that it has a new disk drive, which in MY case on
  229. MY machine will automatically be called drive D:, since I'm already using
  230. drives A: through C:. This "Electronic Disk", "RAM-Disk", "E-Drive", or
  231. whatever you want to call it, is actually the main part of your computer's
  232. RAM memory, set up to act just like a disk drive. The normal, default size
  233. of this RAM-Disk is only 360k, which is NOT enough for the XFERLIST file
  234. and the temporary files created by the FIND and MORE filters. So, we give 
  235. the RAM-Disk a size of 400k.
  236.  
  237.  
  238.                          THE AUTOEXEC.BAT FILE.   
  239.  
  240.     Each time you start up the computer, the Disk Operating System (DOS)
  241. looks for a "batch" file called AUTOEXEC.BAT, containing as many or as
  242. few commands as we desire.  DOS then follows these commands, one by
  243. one.   
  244.  
  245.     Here's what AUTOEXEC.BAT on the LOOK4 diskette should look like: 
  246.  
  247. echo off
  248. cls
  249. d:
  250. A:flip caps on
  251. copy A:LOOK4.BAT
  252. copy a:XFERLIST
  253. copy a:FIND.EXE
  254. copy a:MORE.COM
  255. cls
  256. echo To use the LOOK4 batch file properly, first decide what string you
  257. echo want to search for. For example: you might want to find every occurrence of
  258. echo the characters "DB3", because you have a sudden interest in dBASE III.
  259. echo So, you issue the following command and press enter: 
  260. echo LOOK4 DB3
  261. echo If you want the same output, only you want it to be printed out, try
  262. echo LOOK4 DB3 P
  263.  
  264.     Again, I'll explain the new concepts:   
  265.  
  266.  
  267. ECHO OFF             is used as first line of EVERY batch file, and
  268.                      normally nowhere else.  It means we don't want the 
  269. following commands flashed on the screen in a confusing way, so "zip
  270. your lip, computer!"
  271.  
  272. CLS                  means "clear the screen".  The second command for
  273.                      EVERY batch file.
  274.  
  275. D:                   means that DOS should pay attention to drive D:
  276.                      from now on.  (Remember, D: refers to the RAM-Disk.)
  277. This tells DOS that you want to  "change the default drive", meaning that
  278. all of your previous commands might conceivably have been taking it for
  279. granted that drive A: was the important one, and now drive D: is going to
  280. be the important one.  It is CRUCIAL that this line have an accurate drive
  281. specifier that will work properly on YOUR machine. Like I said earlier,
  282. the CONFIG.SYS file automatically loads the RAM-Disk as drive D:, but it
  283. might be drive C: or E: or F: or WHATEVER on your machine. This line is
  284. the one to modify if you have any problems.
  285.  
  286. A:FLIP CAPS ON      automatically hits the CapsLock key for us, turning it
  287.                     on. This is the ONLY time we use the FLIP command.
  288.  
  289. COPY A:LOOK4.BAT
  290. COPY A:etc.         copies the 4 important files onto the RAM-Disk.
  291.  
  292. ECHO To use etc.    means that it's okay to temporarily step out of the
  293.                     "zip your lip" mode, just to put a message on the screen.
  294.  
  295.  
  296.                         THE LOOK4.BAT BATCH FILE.
  297.  
  298.      Here's what it should look like:
  299.  
  300. echo off
  301. CLS
  302. IF '%2' == 'P' GOTO PRINT
  303. type xferlist | find "%1" >output.fil
  304. type output.fil | more
  305. GOTO END
  306. :PRINT
  307. type xferlist | find "%1" >PRN
  308. :END
  309.  
  310.      Here's the explanation of the new concepts in this file:
  311.  
  312. IF '%2' == 'P' GOTO PRINT   is a standard but poorly documented way of
  313.                             testing to see if you typed in a 'P' after the
  314. normal two words of your command. The fact that there is a "%2" in the
  315. command means that we are exploiting the concept of REPLACEABLE
  316. PARAMETERS, which needs a bit more explanation.  If I type in the "LOOK4
  317. MYM" command, then the "LOOK4" is a parameter (called "%0"), and the "MYM"
  318. is another parameter (called "%1"). If we had phrased our command with one
  319. more parameter by typing in  "LOOK4 MYM P", then the "P" is the parameter
  320. called "%2". It can go all the way up to parameter 9 if you want. I never
  321. go beyond parameter 3, personally. So, if I were to translate this whole
  322. command into babytalk English, it would say this: "Check to see if the
  323. human being put a "P" as the third word in the command. If they did, skip
  324. the next few lines until you find a line consisting of the word 'PRINT'
  325. with a ':' at the beginning of it. At that point, continue doing the next
  326. few lines after it. If there is NOT a 'P' at all, or the parameter is 
  327. anything BUT a 'P', just continue with the next line."
  328.  
  329. TYPE XFERLIST | FIND "%1" >OUTPUT.FIL  is a VERY good line to learn from. 
  330.                                        Here's the English translation: 
  331. "Literally display or dump the file called XFERLIST, only instead of
  332. dumping it to the usual place, send it through a pipe, right into the
  333. waiting arms of the FIND command. The FIND command will then look through
  334. the whole file, checking to see if each line might contain the second word
  335. of our command (which is MYM in our example). Once the lines containing
  336. that word have been found, set them aside. After you're done, don't dump
  337. them to the USUAL place, (which is the display monitor), dump them into a
  338. file called OUTPUT.FIL". Believe it or not, all of these concepts are
  339. hidden in the DOS manual, and have been there since DOS version 2.00!
  340. This is all a good way to learn about the FIND filter, which needs to be
  341. used with a LARGE RAM-Disk, because it needs LOTS of room to work with. It
  342. creates several temporary files that it uses as "scratch pads", and then
  343. erases them without your ever seeing them. If you ever run into a "File
  344. Creation Error" error message, you'll need to enlarge the size of your
  345. RAM-Disk by modifying your CONFIG.SYS file.
  346.  
  347. TYPE OUTPUT.FIL | MORE    is the way we make sure our freshly found 
  348.                           information doesn't go scrolling right off the 
  349. screen. For example: there are HUNDREDS of filenames that end with .BAS in
  350. the XFERLIST database, and if you issue the "LOOK4 .BAS" command, you
  351. would normally get these hundreds of lines scrolling past on the screen,
  352. too fast to read. So, here is the English translation of this line:
  353. "Normally, we would dump the contents of the file called OUTPUT.FIL
  354. directly to the screen, but instead, lets feed it through a pipe into the
  355. input of the MORE filter, which will make sure that we get each pageful of
  356. information in an orderly manner".
  357.  
  358. GOTO END       means "skip the next few lines until you find the label
  359.                called END. We'll know it's a GOTO label because it starts
  360.                with a colon".
  361.  
  362. :PRINT         is a GOTO label that begins our printing option.
  363.  
  364. TYPE XFERLIST | FIND "%1" >PRN     works just like the previous line four
  365.                                    lines above, only the output is
  366. different. Instead of storing the output in a temporary file called
  367. OUTPUT.FIL, we redirect the output to the printer, which has a reserved 
  368. device name of PRN.
  369.  
  370. :END           is only a GOTO label that we can skip to when we're done,
  371.                if we need it.
  372.  
  373.  
  374.          IF YOU WOULD LIKE TO USE THE LOOK4 PROCEDURE ON A HARD DISK.
  375.  
  376.      This will work perfectly well, just a little slower. My LOOK4 MYM example 
  377. slowed down from 8.89 seconds to 14.68 seconds, which is STILL plenty
  378. fast. 
  379.  
  380. REQUIREMENTS:
  381. ==================
  382. - DOS 2.00 or higher
  383. - A suitable hard disk, with the PATH command set up (if necessary) to use 
  384.   FIND.EXE, MORE.COM, FLIP.COM and LOOK4.BAT files on the XFERLIST file,
  385.   whatever directory it's in.
  386.  
  387. You'll need the following files:
  388.  
  389. Standard DOS files
  390. ==================
  391. FIND.EXE
  392. MORE.COM
  393.  
  394. Plus the following files which SHOULD be included with this file:
  395. ==================
  396. FLIP.COM
  397. LOOK4.BAT
  398.  
  399. And, finally, the main file with all of the data.
  400. ==================
  401. XFERLIST    
  402.  
  403.      Just make sure that all of the files can get to each other using the
  404. PATH command, and it should work like a little charmer. 
  405.  
  406.      For example: if you have the FIND.EXE, MORE.COM, FLIP.COM and
  407. LOOK4.BAT files in a subdirectory on drive C: called C:\DOS, and you have
  408. the XFERLIST file in a subdirectory called C:\DOWNLOAD, you may issue the
  409. following commands:
  410.  
  411. PATH=C:\DOS          means that we want to give commands, and we want
  412.                      DOS to follow our commands EVERY time.  By giving 
  413. the PATH command each time we start up the computer, we're telling DOS
  414. where it can find further information if it doesn't understand us.  The
  415. THEME of my C:\DOS subdirectory is that it contains all of my TOOLS
  416. AND GOODIES.  DOS will use the news it got from the PATH command to find
  417. any tools and goodies it needs. 
  418.  
  419. CD\DOWNLOAD          to change the default directory to the one containing
  420.                      the XFERLIST file. We can then use the LOOK4 command 
  421. any way we want, and it will work beautifully!
  422.  
  423.  
  424.              HOW DO YOU KEEP YOUR XFERLIST FILE CURRENT?
  425.  
  426.      I don't know which communications software YOU use, but I personally
  427. use Symphony.  Just about ANY telecommunications software will allow you
  428. to capture data into a file.
  429.  
  430.      If I'm telecommunicating with the Chicago BBS, I tell it to List all
  431. files. (There is an option to list only the files that are New since
  432. the bulletin board was called last, but I personally have never found it to
  433. be reliable). I watch these new filenames scroll by until I see one that I
  434. recognize. (I'm capturing all of this information in memory, and can go
  435. back later and edit it). I then delete any information that I already have
  436. in my old XFERLIST file, and then print out the parts I want into a plain
  437. ASCII file. Then, I use DOS to add the new file onto the old XFERLIST,
  438. making it current! Here's how I do it:
  439.  
  440.      If my new ASCII file contains about 20 new rows of information, and
  441. it's called 21NOV85.TXT to show that it's that particular day's new
  442. listing, and the old file called XFERLIST is in the same directory, here
  443. are the commands I would use to add 21NOV85.TXT to the end of XFERLIST:
  444.  
  445. COPY XFERLIST + 21NOV85.TXT TEMP.FIL     This would create a new, bigger
  446.                                          file (called TEMP.FIL) that would 
  447. have the entire contents of XFERLIST first and then the 21NOV85.TXT
  448. contents right after it. Then, 
  449.  
  450. DIR                       To make SURE that I had created a bigger file called 
  451.                           TEMP.FIL, so I could safely go on with the next step.
  452.  
  453. ERASE XFERLIST
  454. ERASE 21NOV85.TXT         To get rid of the old duplicate information files.
  455.  
  456. RENAME TEMP.FIL XFERLIST  Which would make sure that my LOOK4 batch file
  457.                           would not need to be re-written.
  458.  
  459.     This procedure is technically referred to as CONCATENATION OF FILES.
  460.  
  461. ==========================================================================
  462.                             HOW TO FIND ME
  463. Have fun, and if you want to reach me for questions or suggestions, here's
  464. how you do it...
  465.  
  466.     If you DON'T subscribe to the CHICAGO Bulletin Board run by GENE
  467. PLANTZ, you REALLY should! To me, it's like living in Paris! I can find
  468. just about ANYTHING my little heart desires in a VERY short time. Hook up
  469. your modem and communications software and become a paid-up member of the
  470. bulletin board.  
  471.  
  472.     Here are the necessary parameters: 
  473.  
  474.                       PHONE NUMBER: (312) 885-9557 
  475.                          BAUD RATE: 1200 
  476.                             PARITY: NONE 
  477.                             LENGTH: 8 
  478.                          STOP BITS: 1
  479.  
  480.     If you would like to leave an electronic message for me, my ID
  481. number is ID1018.
  482.  
  483.